﻿<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="Candy.App" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:vm="clr-namespace:Candy.ViewModel" 
             xmlns:infra="clr-namespace:Candy.Infrastructure"
             xmlns:candy="clr-namespace:Candy"
              xmlns:appsvc="clr-namespace:System.ServiceModel.DomainServices.Client.ApplicationServices;assembly=System.ServiceModel.DomainServices.Client.Web" 
             mc:Ignorable="d">
    <Application.Resources>
        <ResourceDictionary>
            <vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles/CandyStyles.xaml"/>
                <ResourceDictionary Source="Styles/ConverterResource.xaml"/>
                <ResourceDictionary Source="Styles/SdkDataGridStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            
        </ResourceDictionary>
    </Application.Resources>
    <Application.ApplicationLifetimeObjects>
      
        <candy:WebContext>
            <candy:WebContext.Authentication>
                <appsvc:FormsAuthentication DomainContextType="Candy.Web.CandyAuth, Candy.Web, Version=1.0.0.0" />
                <!--<appsvc:WindowsAuthentication/>-->
            </candy:WebContext.Authentication>
        </candy:WebContext>
    </Application.ApplicationLifetimeObjects>
</Application>